package com.biao.threads_test;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Test04_Executor {
    public static void main(String[] args) {
        // 正常使用时候都是使用线程池，一般不会创建单个线程
        ExecutorService threadPool = Executors.newCachedThreadPool();
        threadPool.execute(new Runnable() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread().getName() + "我是子线程...");
            }
        });
    }
}
